1. Field of the Invention
The present invention relates to a method of inspecting a surface of a workpiece (hereinafter called a workpiece surface) in order to detect a defect or smoothness of the surface such as a painted surface or the like of the workpiece.
2. Description of Related Art
A conventional method of inspecting of this kind is disclosed in Japanese Published Unexamined Utility Model Registration Application No. 14902/1993. Namely, as shown in FIG. 8A, by using an optical inspecting apparatus having a projecting means 1 for radiating an inspecting light towards a workpiece surface A and a picturing means 2 for receiving a reflected light from the workpiece surface A, painting conditions of the workpiece surface A are checked based on the image data of the reflected light to be formed into an image (or image-formed) on the picturing means 2. The adhesion of dust, the presence or absence of scratches, or the like is thus inspected.
In this prior art, the projecting means 1 is made up of a light source 10 and an optical converging system 11 such as a Fresnel lens or the like which radiates the light from the light source 10 towards the workpiece surface A. It is thus so arranged that the radiated light is converged towards the picturing means 2 through the convergence of the detecting light by the optical converging system 11. In this manner, the effective inspection range of the workpiece surface A from which the picturing means 2 can receive the reflected light is enlarged.
The picturing means 2 is made up of a CCD camera which has an image screen 20 on which picture elements made up of CCD elements are arrayed and an optical image-forming system 21 in which a plurality of lenses are combined. The position and the focal length of the picturing means 2 are adjusted such that a focal surface 22 coincides with the workpiece surface A in the central position of the effective inspection range. Inspection is carried out, in this condition, based on the data of an image of reflected light which is formed on the image surface 20 of the picturing means 2.
In this case, if a defective portion B with a projection and a depression exists on the workpiece surface A, the reflected light R from the defective portion B will no longer be received by the picturing means 2, and a dark portion corresponding to the defective portion B will appear on the image of the picturing means 2. Then, a histogram is prepared which represents the number of picture elements for each luminance on the image of the picturing means. The image of the picturing means is binarized on the basis of binarizing a threshold value which is set at a mid-level luminance, between the luminance of the maximum value of the histogram in the bright portion and the luminance of the maximum value of the histogram in the dark portion. The dark portion which is isolated inside the bright portion of the binarized image is determined to be attributable to the defective portion on the workpiece surface. The position and the size of the defective portion are thus detected from the position and the size of the dark portion (see Japanese Published Unexamined Patent Application No. 164703/1993).
However, in the above-described conventional method, a problem exists if the defective portion is small. For example, if a small defective portion B exists on the workpiece surface A, the reflected light R from the defective portion B is received by the picturing means 2, as shown in FIG. 8B. On the image surface 20 thereof the reflected light R is image-formed on the screen in a portion corresponding to the defective portion and, therefore, the defective portion sometimes can not be detected.
In view of the above-described disadvantages, the present invention has an object of providing such a method of inspecting the workpiece surface as will enable to detect even a small defective portion.